home *** CD-ROM | disk | FTP | other *** search
/ Spiceworld The Movie - Interactive CD-ROM / Spiceworld The Movie: Interactive CD-ROM.iso / pc / elements / spicetwo.dir / scripts_31.ls < prev    next >
Encoding:
Text File  |  1997-12-04  |  1.9 KB  |  55 lines

  1. on checkSlidePiece hiddenSpriteNo, lastSpriteNo
  2.   global SCARYSTART, PRINTLIST
  3.   set SCARYSTART to 1
  4.   set pieceWidth to 93
  5.   set spriteNo to the clickOn
  6.   set hiddenH to the locH of sprite hiddenSpriteNo
  7.   set hiddenV to the locV of sprite hiddenSpriteNo
  8.   set spriteH to the locH of sprite spriteNo
  9.   set spriteV to the locV of sprite spriteNo
  10.   if (hiddenH = spriteH) and (hiddenV = (spriteV + pieceWidth)) then
  11.     slidePiece("V", 3, pieceWidth, spriteNo, hiddenSpriteNo)
  12.   else
  13.     if (hiddenH = spriteH) and (spriteV = (hiddenV + pieceWidth)) then
  14.       slidePiece("V", -3, pieceWidth, spriteNo, hiddenSpriteNo)
  15.     else
  16.       if (spriteH = (hiddenH + pieceWidth)) and (hiddenV = spriteV) then
  17.         slidePiece("H", -3, pieceWidth, spriteNo, hiddenSpriteNo)
  18.       else
  19.         if (hiddenH = (spriteH + pieceWidth)) and (hiddenV = spriteV) then
  20.           slidePiece("H", 3, pieceWidth, spriteNo, hiddenSpriteNo)
  21.         else
  22.           beep()
  23.         end if
  24.       end if
  25.     end if
  26.   end if
  27.   repeat with spriteNo = hiddenSpriteNo to lastSpriteNo
  28.     set test to the name of member the memberNum of sprite spriteNo
  29.     if word 1 of test <> the locH of sprite spriteNo then
  30.       exit
  31.     end if
  32.     if word 2 of test <> the locV of sprite spriteNo then
  33.       exit
  34.     end if
  35.   end repeat
  36.   set the blend of sprite hiddenSpriteNo to 100
  37.   put "scary spice print" & RETURN after PRINTLIST
  38.   congratulations()
  39.   returnToMainGame(the frameLabel)
  40. end
  41.  
  42. on slidePiece HorV, offset, pieceWidth, spriteNo, hiddenSpriteNo
  43.   set the locH of sprite hiddenSpriteNo to the locH of sprite spriteNo
  44.   set the locV of sprite hiddenSpriteNo to the locV of sprite spriteNo
  45.   puppetSound("scary move")
  46.   repeat with x = 1 to pieceWidth / 3
  47.     if HorV = "H" then
  48.       set the locH of sprite spriteNo to the locH of sprite spriteNo + offset
  49.     else
  50.       set the locV of sprite spriteNo to the locV of sprite spriteNo + offset
  51.     end if
  52.     updateStage()
  53.   end repeat
  54. end
  55.